package com.excel.comp.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 列表
 * @author Administrator
 *
 */
public class SelectModel {
	List<NameValue> aList = new ArrayList<NameValue>();

	public void put(String name, String value) {
		NameValue nameValue = new NameValue(name, value);
		aList.add(nameValue);
	}
	
	public List getAList() {
		return aList;
	}

	public void setAList(List list) {
		aList = list;
	}
	
	public String[] getNames() {
		String[] names = new String[aList.size()];
		for(int i=0; i<aList.size(); i++) {
			NameValue nv = aList.get(i);
			names[i] = nv.getName();
		}
		return names;	
	}
	
	public String[] getValues() {
		String[] names = new String[aList.size()];
		for(int i=0; i<aList.size(); i++) {
			NameValue nv = aList.get(i);
			names[i] = nv.getValue();
		}
		return names;	
	}
	
}
